package com.dfbz.demo01_卖票案例;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo07_使用匿名内部类创建线程_Thread方式 {

    public static void main(String[] args) {


        /*
        class Xxx extends Thread{

        }
         */
        Thread thread = new Thread() {
            @Override
            public void run() {
                for (int i = 0; i < 10000; i++) {
                    System.out.println(Thread.currentThread().getName());
                }
            }
        };

        thread.start();

        for (int i = 0; i < 10000; i++) {
            System.out.println(Thread.currentThread().getName());
        }
    }

}
